remove unnecessary usage of `current_opt`
authorAndy Russell <arussell123@gmail.com>
Fri, 2 Dec 2016 20:21:31 +0000 (15:21 -0500)
committerAndy Russell <arussell123@gmail.com>
Thu, 8 Dec 2016 21:11:19 +0000 (16:11 -0500)
src/cargo/ops/cargo_rustc/context.rs

index c53ce604072773505ca40269bcd02ffbe01be1bc..09977ca300d30ad4ce26133ddf35e35287be25e5 100644 (file)
@@ -836,9 +836,7 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
     }
 
     pub fn show_warnings(&self, pkg: &PackageId) -> bool {
-        self.ws.current_opt().map_or(false, |p| *pkg == *p.package_id())
-            || pkg.source_id().is_path()
-            || self.config.extra_verbose()
+        pkg.source_id().is_path() || self.config.extra_verbose()
     }
 }